#include <iostream>

void strcount(const char * str);

 int main(void)
 {
 	using namespace std;
 	char input[10];
 	char next;
 	
 	cout << "Enter a line:" << endl;
 	cin.get(input,10);
 	while(cin)
 	{
	 	cin.get(next);
	 	while(next != '\n')
	 		cin.get(next);
	 	strcount(input);
	 	cout << "Enter next line (empty line to quit): " << endl;
	 	cin.get(input,10);
	 }
	 cout << "Bye." << endl;
 	return 0;
 	
 }
 
 
 void strcount(const char *str)
 {
 	using namespace std;
 	static int total = 0;
 	int count = 0;
 	cout << "\"" << str << "\" contains ";
 	while(*str++){
 			count++;
	 	//TODO
	 }
	total += count;
	cout << count << " characters\n";
	cout << total << " characters total\n";
 	
 }
